<!DOCTYPE html>
<html lang="zh">

	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<title>
			<%= title %>
		</title>
		<%- include('../include/stylelist') %>
		<%- include('../include/scriptlist') %>
	</head>

	<body class="layui-layout-body">
		<div class="layui-layout layui-layout-admin">
			<%- include('../include/head',{title:'woyao.tv'})  %>
			<%- include('../include/left',{title:'woyao.tv'})  %>

			<div class="layui-body">
				<!-- 内容主体区域 -->
				<div class="layui-container">
					<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
						<legend>始终等比例水平排列</legend>
					</fieldset>
					<div class="layui-form">
						<div class="layui-form-item">
							<label class="layui-form-label">网站名称</label>
							<div class="layui-input-block">
								<input type="text" name="SiteName" value="<%= Config.SiteName %>" lay-verify="SiteName" autocomplete="off" placeholder="请输入网站名称" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">网站Logo</label>
							<div class="layui-upload">
								<div class="layui-upload-drag" id="WebsiteLogo">
									<i class="layui-icon">&#xe67c;</i>
									<p>点击上传，或将文件拖拽到此处</p>
								</div>
								<div class="layui-input-block">
									<input type="text" name="Websiteurl" value="<%= Config.WebsiteLogo %>" lay-verify="Websiteurl" autocomplete="off" placeholder="上传图片，获取图片地址" class="layui-input">
								</div>
								<div class="layui-upload-list">
									<img class="layui-upload-img" id="WebsiteLogoImg">
									<p id="WebsiteLogoText"></p>
								</div>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">网站关键字</label>
							<div class="layui-input-block">
								<input type="text" name="WebsiteKeyword" value="<%= Config.WebsiteKeyword %>" lay-verify="WebsiteKeyword" autocomplete="off" placeholder="请输入网站关键字" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item layui-form-text">
							<label class="layui-form-label">网站描述</label>
							<div class="layui-input-block">
								<textarea placeholder="请输入内容" name="WebsiteDescription" class="layui-textarea"><%= Config.WebsiteDescription %></textarea>
							</div>
						</div>
						<div class="layui-form-item layui-form-text">
							<label class="layui-form-label">网站统计</label>
							<div class="layui-input-block">
								<textarea placeholder="请输入内容" name="WebsiteStatistics" class="layui-textarea"><%= Config.WebsiteStatistics %></textarea>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">网站备案号</label>
							<div class="layui-input-block">
								<input type="text" name="CaseNumber" value="<%= Config.CaseNumber %>" lay-verify="CaseNumber" autocomplete="off" placeholder="请输入备案号" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">苹果地址</label>
							<div class="layui-input-block">
								<input type="text" name="IOSDown" value="<%= Config.IOSDown %>" lay-verify="IOSDown" autocomplete="off" placeholder="请输入苹果app下载地址" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">安卓地址</label>
							<div class="layui-input-block">
								<input type="text" name="androidDown" value="<%= Config.androidDown %>" lay-verify="IOSDown" autocomplete="off" placeholder="请输入安卓app下载地址" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">首页图标</label>
							<div class="layui-upload">
								<div class="layui-upload-drag" id="HomeImg">
									<i class="layui-icon">&#xe67c;</i>
									<p>点击上传，或将文件拖拽到此处</p>
								</div>
								<div class="layui-input-block">
									<input type="text" name="HomeImgurl" value="<%= Config.HomeImg %>" lay-verify="HomeImgurl" autocomplete="off" placeholder="上传图片，获取图片地址" class="layui-input">
								</div>
								<div class="layui-upload-list">
									<img class="layui-upload-img" id="HomeImgImg">
									<p id="HomeImgText"></p>
								</div>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">首页Title</label>
							<div class="layui-input-block">
								<input type="text" name="HomeTitle" value="<%= Config.HomeTitle %>" lay-verify="HomeTitle" autocomplete="off" placeholder="请输入首页Title" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item layui-form-text">
							<label class="layui-form-label">首页描述</label>
							<div class="layui-input-block">
								<textarea placeholder="请输入内容" name="HomeDescription" class="layui-textarea"><%= Config.HomeDescription %></textarea>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">首页二维码</label>
							<div class="layui-upload">
								<div class="layui-upload-drag" id="HomeQRCode">
									<i class="layui-icon">&#xe67c;</i>
									<p>点击上传，或将文件拖拽到此处</p>
								</div>
								<div class="layui-input-block">
									<input type="text" name="HomeQRCodeurl" value="<%= Config.HomeQRCode %>" lay-verify="HomeQRCodeurl" autocomplete="off" placeholder="上传图片，获取图片地址" class="layui-input">
								</div>
								<div class="layui-upload-list">
									<img class="layui-upload-img" id="HomeQRCodeImg">
									<p id="HomeQRCodeText"></p>
								</div>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">公告标题</label>
							<div class="layui-input-block">
								<input type="text" name="RightTitle" value="<%= Config.RightTitle %>" lay-verify="RightTitle" autocomplete="off" placeholder="请输入首页Title" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">公告内容1</label>
							<div class="layui-input-block">
								<input type="text" name="RightWord1" value="<%= Config.RightWord1 %>" lay-verify="RightWord1" autocomplete="off" placeholder="公告内容1" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">公告内容2</label>
							<div class="layui-input-block">
								<input type="text" name="RightWord2" value="<%= Config.RightWord2 %>" lay-verify="RightWord2" autocomplete="off" placeholder="公告内容2" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">公告内容3</label>
							<div class="layui-input-block">
								<input type="text" name="RightWord3" value="<%= Config.RightWord3 %>" lay-verify="RightWord3" autocomplete="off" placeholder="公告内容3" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">公告内容4</label>
							<div class="layui-input-block">
								<input type="text" name="RightWord4" value="<%= Config.RightWord4 %>" lay-verify="RightWord4" autocomplete="off" placeholder="公告内容4" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">公告内容5</label>
							<div class="layui-input-block">
								<input type="text" name="RightWord5" value="<%= Config.RightWord5 %>" lay-verify="RightWord5" autocomplete="off" placeholder="公告内容5" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-input-block">
								<button class="layui-btn" lay-submit="" id="SiteConfig">立即提交</button>
							</div>
						</div>
					</div>
				</div>
			</div>

			<div class="layui-footer">
				<!-- 底部固定区域 -->
				© WoYao.Tv - 底部固定区域
			</div>
		</div>
		<script>
			//JavaScript代码区域
			layui.use('element', function() {
				var element = layui.element;
			});
			//上传图片 (input file，预读img，url,失败重新传)
			Wo.uploadImg("#WebsiteLogo", "#WebsiteLogoImg", "[name=Websiteurl]", "#WebsiteLogoText");
			Wo.uploadImg("#HomeImg", "#HomeImgImg", "[name=HomeImgurl]", "#HomeImgText");
			Wo.uploadImg("#HomeQRCode", "#HomeQRCodeImg", "[name=HomeQRCodeurl]", "#HomeQRCodeText");
			//保存配置
			$("#SiteConfig").click(function() {
				var option = {
					SiteName: $("[name=SiteName]").val(),
					WebsiteLogo: $("[name=Websiteurl]").val(),
					WebsiteKeyword: $("[name=WebsiteKeyword]").val(),
					WebsiteDescription: $("[name=WebsiteDescription]").val(),
					WebsiteStatistics: $("[name=WebsiteStatistics]").val(),
					CaseNumber: $("[name=CaseNumber]").val(),
					IOSDown: $("[name=IOSDown]").val(),
					androidDown: $("[name=androidDown]").val(),
					HomeImg: $("[name=HomeImgurl]").val(),
					HomeTitle: $("[name=HomeTitle]").val(),
					HomeDescription: $("[name=HomeDescription]").val(),
					HomeQRCode: $("[name=HomeQRCodeurl]").val(),
					RightTitle: $("[name=RightTitle]").val(),
					RightWord1: $("[name=RightWord1]").val(),
					RightWord2: $("[name=RightWord2]").val(),
					RightWord3: $("[name=RightWord3]").val(),
					RightWord4: $("[name=RightWord4]").val(),
					RightWord5: $("[name=RightWord5]").val()
				}
				Wo.SiteConfig(option)
			})
		</script>
	</body>

</html>